<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

App::missing(function($exception)
{
    return Response::view('admin.errors.missing', array(), 404);
});

Route::get('/', function()
{
	return View::make('hello');
});

Route::get('admin/login', 'AdminloginController@index');
Route::post('admin/login/login', 'AdminloginController@login');

Route::group(array('prefix' => 'admin', 'before' => 'admin_auth'), function(){
	Route::controller('user-group', 'AdminUserGroupController');
	Route::controller('user', 'AdminUserController');
	Route::controller('brand', 'AdminBrandController');
	Route::controller('type', 'AdminTypeController');
	Route::controller('product', 'AdminProductController');
	Route::controller('product-key', 'AdminProductKeyController');
	Route::controller('category', 'AdminCategoryController');
});